package cn.org.tpeach.nosql.redis.bean;

import java.io.Serializable;

import cn.org.tpeach.nosql.constant.PublicConstant;
import io.lettuce.core.RedisURI;
import lombok.*;

/**
 * @author tyz
 * @Title: RedisConnectInfo
 * @ProjectName RedisLark
 * @Description: TODO
 * @date 2019-06-23 16:26
 */
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class RedisConnectInfo implements Serializable {
    private static final long serialVersionUID = -8218404487749784420L;
    /**
     * 数据库数量
     */
    public static final int DEFAULT_DBAMOUNT = 20;
    //连接类型 0 默认 1 ssh 2 ssl
    @Getter
    @Setter
    private short connType = 0;
    //主键
    @Getter
    @Setter
    private String id;
    //0单机，1集群
    @Getter
    @Setter
    private int structure;
    //连接名
    @Getter
    @Setter
    private String name;
    //连接主机
    @Getter
    @Setter
    private String host;
    //端口 默认
    @Getter
    @Setter
    private int port ;
    //redis密码
    @Getter
    @Setter
    private String auth;
    @Getter
    @Setter
    private Long timeout = RedisURI.DEFAULT_TIMEOUT;

    @Getter
    @Setter
    private int dbAmount = DEFAULT_DBAMOUNT;
    @Getter
    @Setter
    private String nameSpaceSepartor = PublicConstant.NAMESPACE_SPLIT;
    @Getter
    @Setter
    private boolean isTest;

    @Getter
    @Setter
    private String description;
    @Getter
    @Setter
    private String sshHost;
    @Getter
    @Setter
    private String sshPort;
    @Getter
    @Setter
    private String sshUser;
    @Getter
    @Setter
    private String sshPassword;
    @Getter
    @Setter
    private String sshPrivateKey;




}
